package com.daliu.mapper;

import com.daliu.pojo.po.Role;
import com.daliu.pojo.po.User;
import org.apache.ibatis.annotations.*;

import java.util.List;
@Mapper
public interface UserMapper {

    List<User> findByPage(@Param("startNum") int startNum,@Param("pageSize") int pageSize);


    List<Role> findALl();

    List<User> findAllUser();

    //@Options(useGeneratedKeys = true,keyColumn = "id",keyProperty = "id")
    int addUser(User user);

    //

    void addRole(@Param("roleId") String roleId,@Param("id") String id);


    void deleteRole(String id);


    int updateUser(User user);


    int deleteUserByPage(@Param("id") String id);

    List<Role> findUserRoles(@Param("id") String id);
}
